(global.webpackJsonp = global.webpackJsonp || []).push([
  ["wjyk_recycle/pages/person-message/person-message"], {
    "029a": function (t, e, n) {
      n.r(e);
      var o, a = n("276d"),
        i = n.n(a);
      for (o in a) "default" !== o && function (t) {
        n.d(e, t, function () {
          return a[t];
        });
      }(o);
      e.default = i.a;
    },
    "23d7": function (t, e, n) {
      var o = n("a60c");
      n.n(o).a;
    },
    "276d": function (t, i, r) {
      (function (o) {
        Object.defineProperty(i, "__esModule", {
          value: !0
        }), i.default = void 0;
        var t, a = (t = r("4795")) && t.__esModule ? t : {
          default: t
        };

        function c(t, e, n, o, a, i, r) {
          try {
            var s = t[i](r),
              c = s.value;
          } catch (t) {
            return n(t), 0;
          }
          s.done ? e(c) : Promise.resolve(c).then(o, a);
        }

        function e(s) {
          return function () {
            var t = this,
              r = arguments;
            return new Promise(function (e, n) {
              var o = s.apply(t, r);

              function a(t) {
                c(o, e, n, a, i, "next", t);
              }

              function i(t) {
                c(o, e, n, a, i, "throw", t);
              }
              a(void 0);
            });
          };
        }
        var n = {
          data: function () {
            return {
              obj: {
                id: "",
                consignee: "",
                consignee_phone: "",
                location: "",
                detail: "",
                idnumber:"",
                is_default: 2
              },
              lng: "",
              lat: "",
              name: "",
              input_code: "",
              telphone: "",
              detail: "",
              code: "",
              title: "获取验证码",
              timer: 60,
              disabled: !1,
              region: ["", "", ""],
              province: "",
              city: "",
              county: "",
              is_open: null
            };
          },
          onLoad: function () {
            this.user(), this.systems();
            
          },
          // 注释getLocation
          getLocation:function() {
            wx.chooseLocation({ 
              success: res=>{
                console.log(res)
                debugger
              }
            })
          },
          methods: {
            // 注释getLocation
            getLocation:function() {
              // debugger
              wx.chooseLocation({
                latitude:41.68383 ,
                longitude:123.47110,
                success: (res) => {
                  debugger
                  console.log(res)
              
                  
                },fail(e){
                  debugger
                  console.log(e)
                }
              })
            },
            getLocation() {
              var that = this;
              wx.getLocation({
                type: 'wgs84',
                success (res) {
                  const latitude = res.latitude
                  const longitude = res.longitude
                  const speed = res.speed
                  const accuracy = res.accuracy
                  console.log(res) //将获取到的经纬度信息输出到控制台以便检查
                  that.setData({ //将获取到的经度、纬度数值分别赋值给本地变量
                    latitude: res.latitude,
                    longitude: res.longitude
                  })
                }
               })
            },
            chooseLocation: function () {
              var n, t, o = this,
                a = this;
              console.log("经纬度", a.lat, a.lng), this.obj.id ? c.getLocation({
                // latitude: a.lat,41.68383 
                latitude:41.68383 ,
                longitude:123.47110,
                // longitude: a.lng,123.47110
                success: (t = i(s.default.mark(function e(n) {
                  return s.default.wrap(function (e) {
                    for (;;) switch (e.prev = e.next) {
                      case 0:
                        console.log("ret", n), c.chooseLocation({
                          latitude: a.lat,
                          longitude: a.lng,
                          success: function (e) {
                            console.log("res", e), console.log("位置名称：" + e.name), console.log("详细地址：" + e.address),
                              console.log("纬度：" + e.latitude), console.log("经度：" + e.longitude), a.lng = e.longitude,
                              a.lat = e.latitude, o.obj.location = e.address, console.log("111111111111", a.lng, a.lat);
                          }
                        });

                      case 2:
                      case "end":
                        return e.stop();
                    }
                  }, e);
                })), function (e) {
                  return t.apply(this, arguments);
                }),
                fail: function (e) {
                  c.showModal({
                    title: "温馨提示",
                    content: "您已拒绝定位,请开启",
                    confirmText: "去设置",
                    success: function (e) {
                      e.confirm && openSetting();
                    }
                  });
                }
              }) : c.getLocation({
                success: (n = i(s.default.mark(function e(n) {
                  return s.default.wrap(function (e) {
                    for (;;) switch (e.prev = e.next) {
                      case 0:
                        console.log("ret", n), c.chooseLocation({
                          success: function (e) {
                            console.log("res", e), console.log("位置名称：" + e.name), console.log("详细地址：" + e.address),
                              console.log("纬度：" + e.latitude), console.log("经度：" + e.longitude), a.lng = e.longitude,
                              a.lat = e.latitude, o.obj.location = e.address, console.log("111111111111", a.lng, a.lat);
                          }
                        });

                      case 2:
                      case "end":
                        return e.stop();
                    }
                  }, e);
                })), function (e) {
                  return n.apply(this, arguments);
                }),
                fail: function (e) {
                  c.showModal({
                    title: "温馨提示",
                    content: "您已拒绝定位,请开启",
                    confirmText: "去设置",
                    success: function (e) {
                      e.confirm && openSetting();
                    }
                  });
                }
              });
            },
            addressCheck: function (e, t) {
              var o = this;
              return i(s.default.mark(function e() {
                var n;
                return s.default.wrap(function (e) {
                  for (;;) switch (e.prev = e.next) {
                    case 0:
                      return e.next = 2, o.$http({
                        url: o.$api.addressCheck,
                        data: {
                          lng: o.lng,
                          lat: o.lat
                        }
                      });

                    case 2:
                      n = e.sent, console.log("判断位置是否在区域范围内", n, n.data), 0 == n.errno && (o.obj.location = t,
                        console.log("eeeeeeeeeeeeee", o.obj.location));

                    case 5:
                    case "end":
                      return e.stop();
                  }
                }, e);
              }))();
            },
            deleteAdd: function () {
              var n, o = this;
              c.showModal({
                title: "提示",
                content: "确认删除该地址？",
                success: (n = i(s.default.mark(function e(n) {
                  var t;
                  return s.default.wrap(function (e) {
                    for (;;) switch (e.prev = e.next) {
                      case 0:
                        if (n.confirm) return e.next = 3, o.$http({
                          url: o.$api.addressDel,
                          data: {
                            id: o.obj.id
                          }
                        });
                        e.next = 7;
                        break;

                      case 3:
                        0 == (t = e.sent).errno && (console.log(t), c.showModal({
                          title: "提示",
                          showCancel: !1,
                          content: t.message,
                          success: function (e) {
                            if (e.confirm) c.navigateBack();
                            else if (e.cancel) return;
                          }
                        })), e.next = 8;
                        break;

                      case 7:
                        n.cancel && console.log("用户点击取消");

                      case 8:
                      case "end":
                        return e.stop();
                    }
                  }, e);
                })), function (e) {
                  return n.apply(this, arguments);
                })
              });
            },
            bindPickerChange: function (t) {
              console.log("picker发送选择改变，携带值为", t, t.target.value), this.region[0] = t.target.value[0],
                this.region[1] = t.target.value[1], this.region[2] = t.target.value[2], this.province = t.target.value[0],
                this.city = t.target.value[1], this.county = t.target.value[2];
            },
            save: function () {
              return this.name ? this.telphone ? /^1[3456789]\d{9}$/.test(this.telphone) ? this.input_code || 1 != this.is_open ? this.input_code != this.code && 1 == this.is_open ? (this.showToast("验证码错误"),
                !1) : this.province ? this.detail ? (console.log("提交成功"), this.update(), void console.log("点击了保存", -1 == this.name.indexOf(" "), this.name, this.telphone, this.code, this.province, this.detail)) : (this.showToast("详细地址不能为空"),
                !1) : (this.showToast("请选择收货地址"), !1) : (this.showToast("请输入验证码"), !1) : (this.showToast("请输入正确的手机号码"),
                !1) : (this.showToast("手机号码不能为空"), !1) : (this.showToast("姓名不能为空"), !1);
            },
            showToast: function (t) {
              o.showToast({
                title: t,
                duration: 1e3,
                icon: "none"
              });
            },
            getVal: function (t) {
              t = t.detail.value;
              console.log("phone", t), this.data.telphone = t;
            },
            getCode: function () {
              var t = this;
              console.log("++++++++", this.telphone);
              var e = !0;
              if (this.disabled) console.log("重复点击");
              else {
                if (!/^1[3456789]\d{9}$/.test(this.telphone)) return void wx.showToast({
                  title: "请输入正确的手机号码",
                  icon: "none"
                });
                this.disabled = !0;
                var n = setInterval(function () {
                  if (t.timer--, t.title = t.timer + "s后重新发送", 0 == t.timer) return clearInterval(n),
                    t.title = "获取验证码", t.disabled = !1, void(t.timer = 60);
                }, 1e3);
              }
              e && this.sendMobile();
            },
            sendMobile: function () {
              var n = this;
              return e(a.default.mark(function t() {
                var e;
                return a.default.wrap(function (t) {
                  for (;;) switch (t.prev = t.next) {
                    case 0:
                      return t.next = 2, n.$http({
                        url: n.$api.sendMobile,
                        data: {
                          telphone: n.telphone
                        }
                      });

                    case 2:
                      e = t.sent, console.log("发送验证码成功", e), 0 == e.errno && (console.log("验证码", e, e.data),
                        n.code = e.data);

                    case 5:
                    case "end":
                      return t.stop();
                  }
                }, t);
              }))();
            },
            update: function () {
              var n = this;
              return e(a.default.mark(function t() {
                var e;
                return a.default.wrap(function (t) {
                  for (;;) switch (t.prev = t.next) {
                    case 0:
                      return t.next = 2, n.$http({
                        url: n.$api.update,
                        data: {
                          uid: o.getStorageSync("uid"),
                          realname: n.name,
                          telphone: n.telphone,
                          province: n.province,
                          city: n.city,
                          county: n.county,
                          detail: n.detail,
                          idnumber:n.idnumber
                        }
                      });

                    case 2:
                      e = t.sent, console.log("发送验证码成功", e), 0 == e.errno && o.showModal({
                        title: "提示",
                        showCancel: !1,
                        content: e.message,
                        success: function (t) {
                          if (t.confirm) o.navigateBack({
                            delta: 1
                          });
                          else if (t.cancel) return;
                        }
                      });

                    case 5:
                    case "end":
                      return t.stop();
                  }
                }, t);
              }))();
            },
            user: function () {
              var n = this;
              return e(a.default.mark(function t() {
                var e;
                return a.default.wrap(function (t) {
                  for (;;) switch (t.prev = t.next) {
                    case 0:
                      return t.next = 2, n.$http({
                        url: n.$api.user,
                        data: {
                          uid: o.getStorageSync("uid")
                        }
                      });

                    case 2:
                      0 == (e = t.sent).errno && (n.name = e.data.realname, n.telphone = e.data.telphone,
                          n.province = e.data.province, n.city = e.data.city, n.county = e.data.county, n.detail = e.data.detail,
                          n.region[0] = e.data.province, n.region[1] = e.data.city, n.region[2] = e.data.county),
                        console.log("用户信息", e, n.province, n.region[0]);

                    case 5:
                    case "end":
                      return t.stop();
                  }
                }, t);
              }))();
            },
            systems: function () {
              var n = this;
              return e(a.default.mark(function t() {
                var e;
                return a.default.wrap(function (t) {
                  for (;;) switch (t.prev = t.next) {
                    case 0:
                      return t.next = 2, n.$http({
                        url: n.$api.system
                      });

                    case 2:
                      0 == (e = t.sent).errno && (console.log("系统设置", e), n.is_open = e.data.is_open);

                    case 4:
                    case "end":
                      return t.stop();
                  }
                }, t);
              }))();
            }
          }
        };
        i.default = n;
      }).call(this, r("543d").default);
    },
    "2f9b": function (t, e, n) {
      n.r(e);
      var o, a = n("c705"),
        i = n("029a");
      for (o in i) "default" !== o && function (t) {
        n.d(e, t, function () {
          return i[t];
        });
      }(o);
      n("23d7");
      var r = n("f0c5"),
        a = Object(r.a)(i.default, a.b, a.c, !1, null, null, null, !1, a.a, void 0);
      e.default = a.exports;
    },
    a482: function (t, e, n) {
      (function (t) {
        function e(t) {
          return t && t.__esModule ? t : {
            default: t
          };
        }
        n("8163"), e(n("66fd")), t(e(n("2f9b")).default);
      }).call(this, n("543d").createPage);
    },
    a60c: function (t, e, n) {},
    c705: function (t, e, n) {
      function o() {
        this.$createElement, this._self._c;
      }
      var a = [];
      n.d(e, "b", function () {
        return o;
      }), n.d(e, "c", function () {
        return a;
      }), n.d(e, "a", function () {});
    }
  },
  [
    ["a482", "common/runtime", "common/vendor"]
  ]
]);